Functions


Comparing Strings for Equality

EqualString Compares two Pascal strings for equality, using the comparison rules of the Macintosh file system. This is a simple, character-by-character value comparison.
IdenticalString Compares two Pascal strings for equality, making use of the string comparison information from a resource that you specify as a parameter.
IdenticalText Compares two text strings for equality, making use of the string comparison information from a resource that you specify as a parameter.

Converting Between Integers and Strings

NumToString Converts a long integer value into a Pascal string.
StringToNum Converts the Pascal string representation of a base-10 number into a long integer value.

Converting Between Strings and Floating-Point Numbers

ExtendedToString Converts an internal floating-point representation of a number into a string that can be presented to the user, using a NumFormatStringRec structure to specify how the output number string is formatted
StringToExtended Converts a string representation of a number into a floating-point number, using a NumFormatStringRec structure to specify how the input number string is formatted.

Defining and Specifying Strings

GetIndString Loads a string from a string list ('STR#') resource into memory, given the resource ID of the string list and the index of the individual string.
GetString Loads a string from a string ('STR ') resource into memory.
NewString Allocates memory in the heap for a string, copies its contents, and produces a handle for the heap version of the string.
SetString Changes the contents of a string referenced by a string handle, replacing the previous contents by copying the specified string.

Determining Sorting Order for Strings in Different Languages

LanguageOrder Determines the order in which strings in two different languages should be sorted.
ScriptOrder Determines the order in which strings in two different scripts should be sorted.
StringOrder Compares two Pascal strings, taking into account the script system and language for each of the strings.
TextOrder Compares two text strings, taking into account the script and language for each of the strings.

Determining Sorting Order for Strings in the Same Language

CompareString Compares two Pascal strings, making use of the string comparison information from a resource that you specify as a parameter.
CompareText Compares two text strings, making use of the string comparison information from a resource that you specify as a parameter.
RelString Compares two Pascal strings using the string comparison rules of the Macintosh file system and returns a value that indicates the sorting order of the first string relative to the second string.

Modifying Characters and Diacritical Marks

LowercaseText Converts any uppercase characters in a text string into their lowercase equivalents.
UpperString Converts any lowercase letters in a Pascal string to their uppercase equivalents, using the Macintosh file system rules.
UppercaseStripDiacritics Converts any lowercase characters in a text string into their uppercase equivalents and strips any diacritical marks from the text.
UppercaseText Converts any lowercase characters in a text string into their uppercase equivalents.

Searching for and Replacing Strings

Munger Searches text for a specified string pattern and replaces it with another string.
ReplaceText Searches text on a character-by-character basis, replacing all instances of a string in that text with another string.

Truncating Strings

TruncString Ensures that a Pascal string fits into the specified pixel width, by truncating the string as necessary. This function makes use of the current script and font.
TruncText Ensures that a text string fits into the specified pixel width, by truncating the string as necessary. This function makes use of the current script and font.

Using Number Format Specification Strings for International Number Formatting

FormatRecToString Converts an internal representation of number formatting information into a number format specification string, which can be displayed and modified.
StringToFormatRec Creates a number format specification string structure from a number format specification string that you supply in a Pascal string.

Working With Word, Script, and Line Boundaries

FindScriptRun Finds the next block of subscript text within a script run.
FindWordBreaks Determines the beginning and ending boundaries of a word in a text string.
StyledLineBreak Returns the proper location to break a line of text, taking into account script and language considerations, making use of tables in the string-manipulation ('itl2') resource in its computations.

Miscellaneous

C2PStr
CopyCStringToPascal
CopyPascalStringToC
DisposeIndexToStringUPP
FindWord
IUCompPString
IUCompString
IUEqualPString
IUEqualString
IULangOrder
IUMagIDPString
IUMagIDString
IUMagPString
IUMagString
IUScriptOrder
IUStringOrder
IUTextOrder
InvokeIndexToStringUPP
LowerText
LwrText
NFindWord
NewIndexToStringUPP
P2CStr
StripText
StripUpperText
TypeSelectClear
TypeSelectCompare
TypeSelectFindItem
TypeSelectNewKey
UpperText
UprText
c2pstr
c2pstrcpy
equalstring
getindstring
iucomppstring
iucompstring
iuequalpstring
iuequalstring
iustringorder
newstring
numtostring
p2cstr
p2cstrcpy
relstring
setstring
stringtonum
upperstring

© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)